package com.cskaoyan.controller;
/*
 * @author 魏骏杰
 */

import com.cskaoyan.bean.basebean.BaseRespVo;
import com.cskaoyan.bean.statistics.BaseStatisticsParam;
import com.cskaoyan.service.StatisticsService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin/stat")
public class StatisticsController {
    @Autowired
    StatisticsService statisticsService;

    @RequiresPermissions(value = "admin:stat:user")
    @RequestMapping("user")
    public BaseRespVo userDateList() {
      return BaseRespVo.ok(statisticsService.getUserDateList());
    }

    @RequiresPermissions(value = "admin:stat:order")
    @RequestMapping("order")
    public BaseRespVo orderDateList(){
        return BaseRespVo.ok(statisticsService.getOrderDateList());
    }

    @RequiresPermissions(value = "admin:stat:goods")
    @RequestMapping("goods")
    public BaseRespVo GoodsDateList() {
        return BaseRespVo.ok(statisticsService.getGoodsDateList());
    }

}
